package com.dzf.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

/**
* @author dzf
* 博客类
*
*
*  @Data get/set
*  @NoArgsConstructor 无参
*  @AllArgsConstructor 有参
*  @ToString toString方法
*
*/
@Document("t_blog")
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class Blog {
    /**
     * id 博客的id
     * uid:攥写用户的ID
     * typeid:博客类型ID
     * contextId:文章内容的id
     * author:作者
     * title:文章标题
     * summary ： 文章摘要
     * likenums:点赞数
     * readvolume:阅读数
     * review：评论数；
     * createtime:创建时间
     * modifyTime ： 修改时间
     */
    @Id
    private String id;
    private String uid;
    private String contextId;
    private String typeid;
    private String author;
    private String title;
    private String summary;
    private int likenums;
    private int readvolume;
    private int review;
    private Date createTime;
    private Date modifyTime;

}
